<?php
namespace App\Traits;

use App\Models\FakeList;

Trait Trait17_22 {

    public function weatherStatus()
    {
        $weather = [
            'month' => date('m'),
            'day' => date('d'),
        ];
        $people = [
            'attendance' => random_int(11, 400),
            'visitors' => random_int(11, 100),
        ];
        $usageRata = [
            'liftRate' => random_int(0,100),
            'labRate' => random_int(0,100),
            'lineRate' => random_int(0,100),
            'parkingRate' => random_int(0,100),
            'lightingRate' => random_int(0,100),
            'powerRate' => random_int(0, 100)
        ];
        $responseJson = [
            'code' => 200,
            'message' => '',
            'data' => [
                'weather' => $weather,
                'usageRate' => $usageRata,
                'people' => $people
            ]
        ];
        return response()->json($responseJson);
    }

}
